import java.util.Scanner;

public class test {
    public static int sum(int n){
        if(n!=0)
        {
            return n=n+sum(n-1);
        }
        else{
            return 0;
        }
    }
    public static void main(String[] args) {
        System.out.println(sum(123));

    }
}
